<?php

/**
 * VanillaAnnounce form base class.
 *
 * @package    vanilla
 * @subpackage form
 * @author     Emiliano Nobis <emiliano.nobis@gmail.com>
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseVanillaAnnounceForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'         => new sfWidgetFormInputHidden(),
      'date'       => new sfWidgetFormDate(),
      'preview'    => new sfWidgetFormInput(),
      'created_at' => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'         => new sfValidatorPropelChoice(array('model' => 'VanillaAnnounce', 'column' => 'id', 'required' => false)),
      'date'       => new sfValidatorDate(),
      'preview'    => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'created_at' => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('vanilla_announce[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'VanillaAnnounce';
  }

  public function getI18nModelName()
  {
    return 'VanillaAnnounceI18n';
  }

  public function getI18nFormClass()
  {
    return 'VanillaAnnounceI18nForm';
  }

}
